import http from '@/api'

const anchorUrl = `${import.meta.env.VITE_APP_API_ANCHOR_URL}`

// 创建AI绘图
const postPaintSave = <T = any>(params: ApiPaint.PaintSaveReq) => {
  return http.post<T>(`${anchorUrl}/ai/paint/save`, params)
}

// 根据作品id获取绘画作品
const getPaintOne = <T = any>(params: ApiPaint.PaintOneReq) => {
  return http.get<T>(`${anchorUrl}/ai/paint/one`, params)
}

const PaintService = {
  postPaintSave: postPaintSave,
  getPaintOne: getPaintOne
}

export default PaintService
